package mi.payment.bean.settings;

import android.view.View.OnClickListener;

import java.io.Serializable;

public class MenuItem implements Serializable {

    private static final long serialVersionUID = 1447601061789067337L;

    public int tag;
    public int strResId;
    public int iconResId;
    public transient OnClickListener action;

    private MenuItem() {
    }

    private MenuItem(int iconId, int strId, OnClickListener action, int tag) {
        this.iconResId = iconId;
        this.strResId = strId;
        this.action = action;
        this.tag = tag;
    }

    public void setIconId(int iconId) {
        this.iconResId = iconId;
    }

    public void setStrId(int strId) {
        this.strResId = strId;
    }

    public void setAction(OnClickListener action) {
        this.action = action;
    }

    public void setTag(int tag) {
        this.tag = tag;
    }

    public int getIconId() {
        return iconResId;
    }

    public int getStrId() {
        return strResId;
    }

    public OnClickListener getAction() {
        return action;
    }

    public int getTag() {
        return tag;
    }

    public static class Builder {

        private int iconId;
        private int strId;
        private OnClickListener action;
        private int tag;

        public Builder() {

        }

        public Builder iconId(int iconId) {
            this.iconId = iconId;
            return this;
        }

        public Builder strId(int strId) {
            this.strId = strId;
            return this;
        }

        public Builder action(OnClickListener action) {
            this.action = action;
            return this;
        }

        public Builder tag(int tag) {
            this.tag = tag;
            return this;
        }

        public MenuItem build() {
            return new MenuItem(iconId, strId, action, tag);
        }

    }


}
